package com.gct.domain.wrapper;

import java.io.Serializable;
import java.util.Calendar;
import java.util.LinkedList;
import java.util.List;
import java.util.TimeZone;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;

@JsonInclude(Include.NON_NULL)
public class DomainWrapper <T> implements Serializable{
    private static final long serialVersionUID = -6769068045904406062L;
//    @JsonIgnore
    private long ts = Calendar.getInstance(TimeZone.getTimeZone("UTC")).getTimeInMillis();
    private String code="";
    private String msg = "ok";
//    @JsonIgnore
//    private String random = UUID.randomUUID().toString();
//    @JsonIgnore
//    private static String sk = HttpURLSecurity.encrypt();
//    @JsonIgnore
//    private String token = HttpURLSecurity.encrypt(ts+Constants.appVersion+sk+random);
    private List<T> data = new LinkedList<T>();

    public long getTs() {
        return ts;
    }
    public void setTs(long ts) {
        this.ts = ts;
    }
//    public String getRandom() {
//        return random;
//    }
//    public void setRandom(String random) {
//        this.random = random;
//    }
//    public String getToken() {
//        return token;
//    }
//    public void setToken(String token) {
//        this.token = token;
//    }
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
    public String getMsg() {
        return msg;
    }
    public void setMsg(String msg) {
        this.msg = msg;
    }
    public List<T> getData() {
        return data;
    }
    public void setData(List<T> data) {
        this.data = data;
    }
}
